<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:t="http//myfaces.apache.org/tomahawk"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" prefix="a4j">
<head>
<title>Max-min algebra: Demonstration of finding maximum
solution</title>
<meta http-equiv="Content-language" content="cs" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

</head>
<body>
<style type="text/css">
<!--
body {
	margin: 10px;
	padding: 0px;
	font-family: "arial ce", "helvetica ce", arial, helvetica, sans-serif;
	font-size: 14px;
	color: #000000;
	background-color: #FFFFFF;
}

.top {
	width: 700px;
	height: 80px;
	background-color: #dfdfdf;
}

.top-banner {
	width: 468px;
	height: 60px;
	margin-top: 5px;
	margin-left: 117px;
	background-color: #eeeeee;
}

.column {
	width: 700px;
	margin-top: 5px;
}

.left-column {
	float: left;
	width: 350px;
	height: 400px;
	background-color: #dfdfdf;
}

.right-column {
	float: right;
	width: 300px;
	height: 400px;
	background-color: #dfdfdf;
}

.bottom {
	width: 700px;
	height: 40px;
	margin-top: 5px;
	background-color: #dfdfdf;
	clear: both;
}
-->
</style>
<f:view>
	<h:form id="form">
		<div class="column">
		<div class="left-column"><h:messages /> <h:messages /> <h:panelGrid
			id="vsechnyMatice" columns="3"
			style="margin-top: 10px; width: 200px;">
			<h:outputText value="A" style="font-size: x-large" />
			<h:outputText value="x1" style="font-size: x-large" />
			<h:outputText value="b1" style="font-size: x-large" />
			<h:panelGrid id="radkyAmatice2" columns="3"
				style="margin-top: 10px; width: 200px;">
				<h:inputText value="#{backingBean.matrixA.rows[0].cols[0].value}"
					style="width: 5ex;" id="a00">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[0].cols[1].value}"
					style="width: 5ex;" id="a01">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[0].cols[2].value}"
					style="width: 5ex;" id="a02">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[1].cols[0].value}"
					style="width: 5ex;" id="a10">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[1].cols[1].value}"
					style="width: 5ex;" id="a11">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[1].cols[2].value}"
					style="width: 5ex;" id="a12">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[2].cols[0].value}"
					style="width: 5ex;" id="a20">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[2].cols[1].value}"
					style="width: 5ex;" id="a21">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[2].cols[2].value}"
					style="width: 5ex;" id="a22">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[3].cols[0].value}"
					style="width: 5ex;" id="a30">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[3].cols[1].value}"
					style="width: 5ex;" id="a31">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixA.rows[3].cols[2].value}"
					style="width: 5ex;" id="a32">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
			</h:panelGrid>
			<h:panelGrid id="radkyMaticex1" columns="1"
				style="margin-top: 10px; width: 60px;">
				<h:inputText value="#{backingBean.x1.rows[0].cols[0].value}"
					style="width: 5ex;" id="x00">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.x1.rows[1].cols[0].value}"
					style="width: 5ex;" id="x10">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.x1.rows[2].cols[0].value}"
					style="width: 5ex;" id="x20">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
			</h:panelGrid>
			<h:panelGrid id="radkyMaticeB1" columns="1"
				style="margin-top: 10px; width: 60px;">
				<h:inputText value="#{backingBean.b1.rows[0].cols[0].value}"
					style="width: 5ex;" id="b100" readonly="true">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.b1.rows[1].cols[0].value}"
					style="width: 5ex;" id="b110" readonly="true">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.b1.rows[2].cols[0].value}"
					style="width: 5ex;" id="b120" readonly="true">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.b1.rows[3].cols[0].value}"
					style="width: 5ex;" id="b130" readonly="true">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
			</h:panelGrid>
		</h:panelGrid> <h:commandButton id="btMultiAX" value="Multiplication A with X."
			actionListener="#{backingBean.multiAX}" /> <h:commandButton
			id="btVynulujAX" value="Clear values."
			actionListener="#{backingBean.clearAX}" /> <h:messages /> <h:panelGrid
			id="vsechnyMaticeProB" columns="3"
			style="margin-top: 10px; width: 200px;">
			<h:outputText value="B" style="font-size: x-large" />
			<h:outputText value="x2" style="font-size: x-large" />
			<h:outputText value="b2" style="font-size: x-large" />
			<h:panelGrid id="radkyBmatice" columns="3"
				style="margin-top: 10px; width: 200px;">
				<h:inputText value="#{backingBean.matrixB.rows[0].cols[0].value}"
					style="width: 5ex;" id="b00">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[0].cols[1].value}"
					style="width: 5ex;" id="b01">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[0].cols[2].value}"
					style="width: 5ex;" id="b02">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[1].cols[0].value}"
					style="width: 5ex;" id="b10">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[1].cols[1].value}"
					style="width: 5ex;" id="b11">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[1].cols[2].value}"
					style="width: 5ex;" id="b12">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[2].cols[0].value}"
					style="width: 5ex;" id="b20">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[2].cols[1].value}"
					style="width: 5ex;" id="b21">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[2].cols[2].value}"
					style="width: 5ex;" id="b22">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[3].cols[0].value}"
					style="width: 5ex;" id="b30">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[3].cols[1].value}"
					style="width: 5ex;" id="b31">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.matrixB.rows[3].cols[2].value}"
					style="width: 5ex;" id="b32">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
			</h:panelGrid>
			<h:panelGrid id="radkyMaticex2" columns="1"
				style="margin-top: 10px; width: 60px;">
				<h:inputText value="#{backingBean.x2.rows[0].cols[0].value}"
					style="width: 5ex;" id="xx00">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.x2.rows[1].cols[0].value}"
					style="width: 5ex;" id="xx10">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.x2.rows[2].cols[0].value}"
					style="width: 5ex;" id="xx20">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
			</h:panelGrid>
			<h:panelGrid id="radkyMaticeB2" columns="1"
				style="margin-top: 10px; width: 60px;">
				<h:inputText value="#{backingBean.b2.rows[0].cols[0].value}"
					style="width: 5ex;" id="bb00" readonly="true">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.b2.rows[1].cols[0].value}"
					style="width: 5ex;" id="bb10" readonly="true">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.b2.rows[2].cols[0].value}"
					style="width: 5ex;" id="bb20" readonly="true">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
				<h:inputText value="#{backingBean.b2.rows[3].cols[0].value}"
					style="width: 5ex;" id="bb30" readonly="true">
					<f:convertNumber type="number" maxIntegerDigits="3" />
				</h:inputText>
			</h:panelGrid>
		</h:panelGrid> <h:commandButton id="btMultiBX" value="Multiplication B with X."
			actionListener="#{backingBean.multiBX}" /> <h:commandButton
			id="btVynulujBX" value="Clear values."
			actionListener="#{backingBean.clearBX}" /></div>
		<div class="right-column"><h:panelGrid id="grid" columns="2"
			style="margin-top: 10px;">
			<h:outputText id="maxNumber" value="Maximum of random numbers:" />
			<h:inputText id="inputMaxNumber" value="#{backingBean.maxNumber}"
				required="true" style="width: 5ex;">
				<f:convertNumber type="number" maxIntegerDigits="3" />
			</h:inputText>
			<h:commandButton id="btRandom" value="Random matrices"
				actionListener="#{backingBean.randomAB}" />
			<h:message id="message2" for="inputMaxNumber" />
		</h:panelGrid> <h:panelGrid id="radkyMaticexMaximumResult" columns="1"
			style="margin-top: 10px; width: 100px;">
			<h:inputText value="#{backingBean.xmaximum.rows[0].cols[0].value}"
				style="width: 5ex;" id="xmaximum00">
				<f:convertNumber type="number" maxIntegerDigits="3" />
			</h:inputText>
			<h:inputText value="#{backingBean.xmaximum.rows[1].cols[0].value}"
				style="width: 5ex;" id="xmaximum10">
				<f:convertNumber type="number" maxIntegerDigits="3" />
			</h:inputText>
			<h:inputText value="#{backingBean.xmaximum.rows[2].cols[0].value}"
				style="width: 5ex;" id="xmaximum20">
				<f:convertNumber type="number" maxIntegerDigits="3" />
			</h:inputText>
		</h:panelGrid> <h:commandButton id="FindXMaximum" value="Find x MAXIMUM."
			actionListener="#{backingBean.findXMaximum}" /></div>
		</div>
		<div class="bottom">SOCO 2009, Fakulty of informatics and
		management, University of Hradec Králové</div>
	</h:form>
</f:view>
</body>
</html>
